﻿#include "GLLInc.h"
#include "GLLObjPrprty.h"

namespace GLL
{
	GLL_Any AnyNull;

	ObjectProperty::ObjectProperty()
	{
		_Props[0] = AnyNull;
		//_Props.set_empty_key(0);
	}

	ObjectProperty::~ObjectProperty()
	{
		_Props.clear();
	}

	void ObjectProperty::CpyPropVal(const PropertyMap& prop)
	{
		PropertyMap::const_iterator iter = prop.begin(), end = prop.end();
		for(; iter != end; ++iter)
		{
			Property_t p = iter->first;
			SetPropVal(p, iter->second);
		}
	}

	void ObjectProperty::SetPropVal( Property_t ip_i, const GLL_Any& ipv_i )
	{
		if(ip_i)
		{
			_Props[ip_i] = ipv_i;
			OnPropertyChanged(ip_i);
		}
	}
};
